package homework_03;

import java.util.Scanner;

/**
 * 数位反转
 */
public class Test_17 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入四位正整数：");
        int n = sc.nextInt();
        int m = 0;
        int nn = 0;
        for(int i=1;i<=1000;i*=10){
            m = n % 10;
            n = n / 10;
            nn = nn * 10 + m;
        }
        System.out.println(nn);
    }
}
